<%@ page contentType="text/html; charset=utf-8" %>
<%@ include file="/WEB-INF/jsp/includeTop.jsp" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>


<table width="100%" border="0" cellpadding="0" cellspacing="5">
  <tr>
    <td valign="top">
      <table class="dbborder" width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td valign="bottom" class="blueTableBg">&nbsp;配置管理&nbsp;-&nbsp;标识维护</td>
        </tr>
        <tr>
          <td>
            <table width="100%" border="0" cellpadding="0" cellspacing="5">
              <tr>
                <td>
                  <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td class="dashTopLeft"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
                      <td class="dashTop" width=100%><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
                      <td class="dashTopRight"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
                    </tr>

                    <tr>
                      <td class="dashLeft"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
                      <td align="center">
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">

						  <tr>
						     <td>
						       <table class="dbborder" width="100%" border="0" cellpadding="0" cellspacing="1">
						         <tr class="rowHead">
                                   <td height="20" nowrap align="center" class="globalTextBold">数据类型</td>
						           <td height="20" nowrap align="center" class="globalTextBold">标识名称</td>
						           <td height="20" nowrap align="center" class="globalTextBold">更新时间</td>
						           <td height="20" nowrap align="center" class="globalTextBold">操作</td>
						         </tr>

                                 <c:set var="actionType" value="-1"/>
                                 <c:set var="groupClass" value="group1"/>
						         <c:forEach var="taskActionDataType" items="${taskActionDataTypeList}" varStatus="status">
                                     <c:if test="${taskActionDataType.actionId != actionType}">
                                         <c:set var="actionType" value="${taskActionDataType.actionId}"/>
                                         <c:choose>
                                             <c:when test="${groupClass == 'group1'}">
                                                 <c:set var="groupClass" value="group0"/>
                                             </c:when>
                                             <c:otherwise>
                                                 <c:set var="groupClass" value="group1"/>
                                             </c:otherwise>
                                         </c:choose>
                                     </c:if>
							         <tr class="rowClass <c:out value="${groupClass}"/>">
							            <td height="20" class="globalText">
							            		<c:choose>
									          		<c:when test="${taskActionDataType.actionId==1}">
									          			拍照
									          		</c:when>
									          		<c:when test="${taskActionDataType.actionId==2}">
									          			输入文本
									          		</c:when>
									          		<c:when test="${taskActionDataType.actionId==3}">
									          			输入数值
									          		</c:when>
									          		<c:when test="${taskActionDataType.actionId==4}">
									          			单选框
									          		</c:when>
									          		<c:when test="${taskActionDataType.actionId==5}">
									          			多选框
									          		</c:when>
									          		<c:when test="${taskActionDataType.actionId==6}">
									          			评分
									          		</c:when>
									          		<c:when test="${taskActionDataType.actionId==7}">
									          			上传附件
									          		</c:when>
									          		<c:when test="${taskActionDataType.actionId==9}">
									          			完成
									          		</c:when>
									          	</c:choose>
							            </td>
                                        <td height="20" class="globalText leftAlign">${taskActionDataType.name}</td>
                                        <td height="20" class="globalText"><fmt:formatDate value="${taskActionDataType.updatedAt}" pattern="yyyy-MM-dd HH:mm"/></td>
							            <td height="20" class="globalText">
											<input type="button" class="btnStyle" value="编辑" onclick="javascript:window.location='stepIdentityEditForm.html?id=${taskActionDataType.id}'">
											<input type="button" class="btnStyle" value="删除" onclick="javascript:removeStepIdentity(${taskActionDataType.id})">
										</td>
							          </tr>
						          </c:forEach>


						       </table>
						     </td>
						   </tr>

                        </table><p/>
                      </td>
                      <td class="dashRight"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
                    </tr>
                    <tr>
                      <td class="dashBottomLeft"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
                      <td class="dashBottom" width=100%><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
                      <td class="dashBottomRight"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<form target="tempFrame" method="post" id="removeStepIdentity" action="<c:url value='/admin/removeStepIdentity.html' />">
    <input type="hidden" id="stepIdentityId" name="taskActionDataTypeId"/>
</form>
<script type="text/javascript">
    function removeStepIdentity(id) {
        if (confirm('删除［步骤标识］并不删除使用该标识的［步骤项］\n删除后如果需要恢复，请联系系统管理员\n\n请确认是否删除步骤标识？')) {
            $('#stepIdentityId').val(id);
            $('#removeStepIdentity').submit();
        }
    }

    function submitCallbackSuccess(obj){
        window.location="<c:url value='/admin/stepIdentityList.html' />";
    }
</script>
